﻿@model XZen.Blogger.Blog

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Blog</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Category)
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <div class="editor-label">
            Description Here
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body, new { rows=10, cols=80 })
            @Html.ValidationMessageFor(model => model.Body)
        </div>

        <div class="editor-label">
           
        </div>
        <div class="editor-field">
            @Html.HiddenFor(model => model.User)
            @Html.ValidationMessageFor(model => model.User)
            @Html.HiddenFor(model => model.IP)
            @Html.ValidationMessageFor(model => model.IP)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
